<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Responsive Admin Dashboard Template">
    <meta name="keywords" content="admin,dashboard">
    <meta name="author" content="skcats">
    <title></title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all" />
    <link th:href="@{/assets/plugins/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/assets/plugins/font-awesome/css/font-awesome.min.css}" rel="stylesheet">
    <link th:href="@{/assets/css/custom.css}" rel="stylesheet">
</head>
<style>
    ::-webkit-scrollbar {display:none}
</style>

<body>
<form method="post" th:action="@{/flow/uploadProcess}" enctype="multipart/form-data">
    <a lay-event="fh" onclick="javascript:history.back(-1);" href="#" style="text-decoration:none">
        <i class="layui-icon"style="font-size: 20px">&#xe65c;</i>
    </a>
    <div class="layui-form-item" style="margin-bottom: 0px;margin-left: 230px;margin-top: 15px">
        <div class="layui-inline" style="width: 350px">
            <label class="layui-form-label" style="width: 90px">文件：</label>
            <div class="layui-input-inline">
                <input id="file" style="margin-top: 5px" type="file" required name="multipartFile"/>
            </div>
        </div>
        <input type="submit" class="layui-btn layui-btn-sm" value="立即添加" style="margin-top: -10px;margin-left: 50px">
    </div>
</form>


    <div >
        <div class="row">
            <table class="table table-hover table-striped">
                <tbody>
                <tr class="success">
                    <th class="col-md-2">#</th>
                    <th>流程编号</th>
                    <th>流程名称</th>
                    <th>流程KEY</th>
                    <th>操作</th>
                </tr>
                <tr th:each="e:${list}">
                    <th class="col-md-2">#</th>
                    <td th:text="${e.id}"></td>
                    <td th:text="${e.name}"></td>
                    <td th:text="${e.key}"></td>
                    <td>
                        <a th:href="@{/flow/toExport(id=${e.id},imageName=${e.diagramResourceName})}">下载流程</a>
                        <a th:href="@{/flow/delProcessDefinition(did=${e.deploymentId})}" onclick="return confirm('是否删除？')">删除流程</a>
                        <a class="dd" th:aa="${e.deploymentId}" th:bb="${e.diagramResourceName}">查看流程图</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</body>
<script th:src="@{/js/register/jquery-3.1.0.min.js}"></script>
<script th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:inline="none">
    layui.use(['jquery','layer'], function() {
        var $ = layui.jquery;
        var layer=layui.layer;



            //点击添加iframe窗方法(添加)
        $(".dd").on('click',function(){
            var did = this.getAttribute("aa");
            var imageName = this.getAttribute("bb");

            layer.open({
                type: 2,
                title: '查看流程',
                maxmin: true, //开启最大化最小化按钮
                area: ['100%', '100%'],
                content: ['/flow/viewProcessImage?did='+did+'&imageName='+imageName]//这是链接你的页面地址 url

            });
        });




    });
</script>

</html>